package org.sws.infrastructure.persistent.dao;

import cn.bugstack.middleware.db.router.annotation.DBRouter;
import cn.bugstack.middleware.db.router.annotation.DBRouterStrategy;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.sws.domain.award.model.entity.AwardRecordEntity;
import org.sws.infrastructure.persistent.po.UserAwardRecord;

import java.util.List;

/**
 * @author songwenshuai
 * @description 用户中奖记录表
 */
@Mapper
@DBRouterStrategy(splitTable = true)
public interface IUserAwardRecordDao {

    void insert(UserAwardRecord userAwardRecord);

    @DBRouter
    List<AwardRecordEntity> queryAwardRecord(@Param("userId") String userId, @Param("activityId") Long activityId);

    int updateAwardRecordCompletedState(UserAwardRecord userAwardRecordReq);
}
